﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using ReversiFrontend;

namespace ReversiFrontend
{
    public partial class MyMessageBox : Form
    {
        public MyMessageBox(string message, bool cancel)
        {
            InitializeComponent();
            this.MessageLabel.Text = message;
            this.DialogResult = DialogResult.No;
            cancelButton.Enabled = cancel;
            cancelButton.Visible = cancel;
            if (MyPanel.BaseColor == Color.DeepPink) //hello kitty
            {
                closeButton.BackgroundImage = Properties.Resources.hk_ok;
                cancelButton.BackgroundImage = Properties.Resources.hk_close;
            }
            else if (MyPanel.BaseColor == Color.Black) //dark
            {
                closeButton.BackgroundImage = Properties.Resources.dark_ok;
                cancelButton.BackgroundImage = Properties.Resources.dark_close;
            }
            else
            {
                closeButton.BackgroundImage = Properties.Resources.standard_ok;
                cancelButton.BackgroundImage = Properties.Resources.standard_close;
            }
        }

        private void closeButton_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.OK;
            this.Close();
        }

        private void mainPanel_Paint(object sender, PaintEventArgs e)
        {

        }

        private void cancelButton_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.Cancel;
            this.Close();
        }


    }
}
